//
// Created by Administrator on 2021/5/30.
//
#include <iostream>

using namespace std;

class Solution {
public:
    bool isPowerOfTwo(int n) {
        // 去除最后一位1
        return n > 0 and (n & (n - 1)) == 0;
        // 获取 n 二进制表示的最低位的 1
//        return n > 0 and (n & -n) == n;
    }
};

int main() {
    Solution sol;
    cout << sol.isPowerOfTwo(16) << endl;
    return 0;
}